/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class PhotoelectricSensor {
    static categoryCode = '010020026';

    static categoryName = '红外对射传感器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return PhotoelectricSensor.categoryCode;
    }

    get categoryName() {
        return PhotoelectricSensor.categoryName;
    }

    getAlarmCondition(params) {
        return command({
            method: 'getAlarmCondition',
            methodId: 'pghzWYAR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getAlarmSwitch(params) {
        return command({
            method: 'getAlarmSwitch',
            methodId: 'pDrhEqVo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getBuzzerSwitch(params) {
        return command({
            method: 'getBuzzerSwitch',
            methodId: 'ptRSbssz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getDistance(params) {
        return command({
            method: 'getDistance',
            methodId: 'p3deL4yE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getIndicatorSwitch(params) {
        return command({
            method: 'getIndicatorSwitch',
            methodId: 'phEq1D6W',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getObjectStatus(params) {
        return command({
            method: 'getObjectStatus',
            methodId: 'p1vFBbk1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getOpticalAxisNumber(params) {
        return command({
            method: 'getOpticalAxisNumber',
            methodId: 'pz93pKQn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getOpticalAxisSpacing(params) {
        return command({
            method: 'getOpticalAxisSpacing',
            methodId: 'pkp1X0X9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSensitivity(params) {
        return command({
            method: 'getSensitivity',
            methodId: 'pdN73uJI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAlarmCondition(params) {
        return command({
            method: 'setAlarmCondition',
            methodId: 'ppAXiVvx',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAlarmSwitch(params) {
        return command({
            method: 'setAlarmSwitch',
            methodId: 'peHyqOcG',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setBuzzerSwitch(params) {
        return command({
            method: 'setBuzzerSwitch',
            methodId: 'pZgRtGlq',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setIndicatorSwitch(params) {
        return command({
            method: 'setIndicatorSwitch',
            methodId: 'pUPQO3fb',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSensitivity(params) {
        return command({
            method: 'setSensitivity',
            methodId: 'pGox7xIk',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default PhotoelectricSensor;
